package psi

import (
	"github.com/mitchellh/mapstructure"
)

// MapToStruct 函数
func MapToStruct(data map[string]interface{}, result interface{}) error {
	err := mapstructure.Decode(data, result)
	if err != nil {
		return err
	}
	return nil
}
